home *** CD-ROM | disk | FTP | other *** search
- Option Explicit
- 'Kustom Magic Software, Copyright (c) 1995, Ralph Krausse
- 'File Created on 1/7/96 11:03:29 AM
-
-
- 'This user-defined data type is what gets passed to the
- 'function declared below. All fields must be filled out
- Type AppInfo
- bOverWriteSeal As Integer 'flag to over-write current seal
- szMagicString As String * 20 'magic string, this string detects the seal if there is one
- szAppName As String * 260 'Your magic string
- End Type
-
-
- Type VERSION
- iMajor As Integer ' Major version
- iMinor As Integer ' Minor version
- iPatch As Integer ' patch version
- bBeta As Integer ' is version a beta?
- End Type
-
- 'VBExample Type..........
- Type VBExample
- bWinNT as Integer
- bWin95 as Integer
- bWin31 as Integer
- dtExpirationDate as Long
- szCompany as String * 60
- szName as String * 40
- szMagicString as String * 20
- End Type
-
-
- 'Declarations...
- Declare Function ValidateApplication Lib "sealer.dll" (APPINFO As APPINFO, ByVal wSealBufferLen%, vpSealBuffer As Any) As Integer
- Declare Sub GetSealError Lib "sealer.dll" (ByVal wErr%, ByVal szErrorString$)
- Declare Function SealApplication Lib "sealer.dll" (APPINFO As APPINFO, ByVal wBufferLen%) As Integer
- Declare Function InitializeBuffer Lib "sealer.dll" (ByVal wLen%) As Integer
- Declare Sub SaveInt Lib "sealer.dll" (ByVal wValue%)
- Declare Sub SaveLong Lib "sealer.dll" (ByVal lValue&)
- Declare Sub SaveString Lib "sealer.dll" (ByVal lpszValue$, ByVal wLen%)
- Declare Sub DeInitializeBuffer Lib "sealer.dll" ()
- Declare Sub GetAPIVersion Lib "sealer.dll" (Version as Version)
-
- 'Time conversion
- Declare Function ConvertDateToLong Lib "sealer.dll" (ByVal wMonth%, ByVal wDay%, ByVal wYear%) As Long
- Declare Function ConvertDateFromLong Lib "sealer.dll" (ByVal lTime&, wMonth%, wDay%, wYear%) As Integer
-
-
- Function ConvertTime# (tmExpire&)
- Dim wMonth%, wDay%, wYear%, wHour%, wMinutes%
- Dim wErr%, szDateString$,szTimeString$
- wErr% = ConvertDateFromLong(tmExpire&, wMonth%, wDay%, wYear%)
- szDateString$ = wMonth% & "/" & wDay% & "/" & wYear%
- ConvertTime# = DateValue(szDateString$)
- End Function
-
-